package org.ysu.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Update;
import org.ysu.pojo.VCadre;

/**
* @author libaoyu
* @description 针对表【v_cadre】的数据库操作Mapper
* @createDate 2024-06-17 14:59:30
* @Entity .pojo.VCadre
*/
public interface VCadreMapper extends BaseMapper<VCadre> {

    //根据参数phone查询password
    String getPasswordByPhone(String phone);
    //根据参数phone查询id
    Integer getIdByPhone(String phone);


    @Update("UPDATE family  \n" +
            "SET vc_id = #{vcid2} \n" +
            "WHERE vc_id = #{vcid1};")
    public Integer changeMaster(Integer vcid1 , Integer vcid2);


    VCadre getVCadre(Integer vcId);
}






